package com.itany.conf;

import org.jasig.cas.client.authentication.UrlPatternMatcherStrategy;

import java.util.regex.Pattern;

/**
 * 验证策略对象
 */
public class SimpleUrlPatterMatchStatey implements UrlPatternMatcherStrategy {

    private Pattern pattern;

    @Override
    public boolean matches(String url) {
        return this.pattern.matcher(url).find();
    }

    @Override
    public void setPattern(String pattern) {
          this.pattern=Pattern.compile(pattern);
    }
}
